# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gmenuharness
pkgver=0.1.4
pkgrel=0
pkgdesc="Library to test GMenuModel structures"
url="https://gitlab.com/ubports/development/core/gmenuharness"
arch="all"
license="LGPL-3.0-only"
depends_dev="
	glib-dev
	gtest-dev
	lomiri-api-dev
	qt5-qtbase-dev
	"
makedepends="
	$depends_dev
	cmake
	cmake-extras
	gmock
	libqtdbustest
	samurai
	"
checkdepends="dbus"
source="https://gitlab.com/ubports/development/core/gmenuharness/-/archive/$pkgver/gmenuharness-$pkgver.tar.gz"
subpackages="$pkgname-dev"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0ff5ab2411b5f7ad104c27dabd1523c63cb9981212f76d13fb4d7241d19cab8336a9bb188d5fcef87cd916ccce037174227c31c36c546e6793f3ec3641b2547c  gmenuharness-0.1.4.tar.gz
"
